package cn.leaves.wb.service;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

import cn.leaves.wb.db.dao.ProfileDAO;
import cn.leaves.wb.db.dao.UserDAO;

@Service("profileService")
public class ProfileService implements UserDetailsService {
	private Log log = LogFactory.getLog(getClass());
	private ProfileDAO profileDAO;
	private UserDAO userDAO;

	@Override
	public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException, DataAccessException {
		// TODO Auto-generated method stub
		throw new UsernameNotFoundException("hehe");
	}

	/**
	 * @param profileDAO
	 *            the profileDAO to set
	 */
	@Autowired
	public void setProfileDAO(ProfileDAO profileDAO) {
		this.profileDAO = profileDAO;
	}

	/**
	 * @param userDAO
	 *            the userDAO to set
	 */
	@Autowired
	public void setUserDAO(UserDAO userDAO) {
		this.userDAO = userDAO;
	}

}
